package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.Travel;
import cn.wolfcode.trip.base.query.TravelQuery;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface TravelMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Travel record);

    Travel selectByPrimaryKey(Long id);

    List<Travel> selectAll();

    int updateByPrimaryKey(Travel record);

    List<Travel> selectForList(TravelQuery qo);

    int changeState(Travel travel);

    List<Travel> selectTravelByStrategyId(Long strategyId);

    void deleteRealtion(@Param("travelId") Long travelId, @Param("strategyId") Long strategyId);

    List<Travel> getRegionTravelByStrategyId(Long strategyId);

    void insertRelation(@Param("strategyId") Long strategyId, @Param("travelId") Long travelId);

    List<Travel> selectByTargetId(Long targetId);
}